#ifndef DELEGATE_H
#define DELEGATE_H

#include <QItemDelegate>
#include <QDebug>
class Delegate : public QItemDelegate
{
    Q_OBJECT
public:
    Delegate(QObject* parent = 0) : QItemDelegate(parent) {}

    void paint(QPainter *painter, const QStyleOptionViewItem &option,
                      const QModelIndex &index ) const;
    QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
                          const QModelIndex &index) const {
        qDebug() << "delegate";
        return new QWidget(parent);
    }
private:
    QStyleOptionProgressBar createProgressBar(int progress, const QStyleOptionViewItem &option) const;
};

#endif // DELEGATE_H
